LassoScript Utility
Basics Browse Detail

[OS_Process->Write]

Tag Link [OS_Process->Write] Category OS Process
Type Member Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type None Security None
Implementation Sets Lasso 8.5

Description

[OS_Process->Write] writes data to the standard input of the native process. A byte stream is written directly to the native process. A string is converted using the character set which was set using [OS_Process->SetEncoding]. If no character has been set then UTF-8 data is sent to the native process.

The [OS_Process->CloseWrite] tag can be used to close the standard input. Some processes will poll for input until the standard input is closed and will then process that input making a result available to [OS_Process->Read] or [OS_Process->ReadString].

Syntax

Var: 'myProcess' = (OS_Process: '/bin/cat');
$myProcess->(Write: 'This is a test\n');
$myProcess->(Write: 'This is a test\n');
$myProcess->CloseWrite;
encode_html: $myProcess->Read;
$myProcess->Close;

Parameters

Required Parameters
Data The byte stream or string data to write to the native process.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.